extends Node2D

export var cell_size = 100
export var map_size = Vector2(3,3)

func _ready():
	for x in range(1,4):
		for y in range(1,4):
			var node = Sprite.new()
			node.texture = load("res://A.png")
			node.position = Vector2(x,y) * 100 + Vector2(x-1,y-1) *50
			print(node.position)
			add_child(node)
	pass

func _input(event):
	if event is InputEventMouseButton and event.pressed:
		var pos = get_local_mouse_position()
		if pos.x/cell_size < map_size.x and pos.y/cell_size < map_size.y:
			print(ceil(pos.x/cell_size),",",ceil(pos.y/cell_size))

